/*
 *  main.cpp
 *  radici
 *
 *  Created by Nicola Gigante on 19/12/07.
 *  Copyright 2007 Nicola Gigante. Distribuito sotto i termini
 *  della GNU General Public License.
 *
 */

#include <QApplication>
#include <QTranslator>
#include <QtDebug>
#include <QErrorMessage>

#include "mainwindow.h"
#include "tf.h"

int main(int argc, char **argv)
{	
	QApplication app(argc, argv);
	QCoreApplication::setOrganizationName("Saigis");
	QCoreApplication::setOrganizationDomain("gigabytes.it");
	QCoreApplication::setApplicationName("Perceel");
	QErrorMessage::qtHandler();
	
	QList<QString> l;
	l << "en" << "it_IT" << "fr_FR" << "fur_FRL";
	
	QTranslator translator;
	translator.load(":/translations/perceel_" + l.at(QSettings().value("settings/language", 1).toInt()));
	app.installTranslator(&translator);
	
	MainWindow *mw = new MainWindow;
	
	if(argc >= 2)
		mw->open(argv[1]);
	
	mw->show();
	
	return app.exec();
}
